package com.zzc.controller;

import com.zzc.service.AccessRecordsService;
import com.zzc.service.impl.AccessRecordsServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

@Controller
public class AccessRecordsController {

    @Autowired
    AccessRecordsServiceImpl accessRecordsService;

    @GetMapping("/accessrecords")
    public String record(Model model){
        model.addAttribute("records",accessRecordsService.getRecords());
        return "accessRecords";
    }
}
